// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package androidx.gdata.blogger;

import java.io.Serializable;

import androidx.gdata.LinkUrl;
import androidx.gdata.Category;
import androidx.gdata.Author;
import androidx.gdata.ThingWithLinks;

/**
 * @author Mike Jennings
 */
public class BlogEntry extends ThingWithLinks implements Serializable {
  private String id;
  private String published;
  private String updated;
  private AppEdited appEdited;
  private AppControl appControl;
  private Category[] categories;
  private String title;
  private String summary;
  private Author author;
  private ThreadTotal threadTotal;
  private BlogContent content;
  private String eTag;

  public BlogEntry(String id, String published, String updated, AppEdited appEdited
      ,AppControl appControl ,Category[] categories, String title, String summary
      ,LinkUrl[] links, Author author, ThreadTotal threadTotal, BlogContent content) {
    super(links);
    this.id = id;
    this.published = published;
    this.updated = updated;
    this.appEdited = appEdited;
    this.appControl = appControl;
    this.categories = categories;
    this.title = title;
    this.summary = summary;
    this.author = author;
    this.threadTotal = threadTotal;
    this.content = content;
  }

  public String getETag() {
    return eTag;
  }

  public void setETag(String eTag) {
    this.eTag = eTag;
  }

  public ThreadTotal getThreadTotal() {
    return threadTotal;
  }

  public AppControl getAppControl() {
    return appControl;
  }

  public void setAppControl(AppControl appControl) {
    this.appControl = appControl;
  }

  public AppEdited getAppEdited() {
    return appEdited;
  }

  public void setAppEdited(AppEdited appEdited) {
    this.appEdited = appEdited;
  }

  public BlogContent getContent() {
    return content;
  }

  public void setContent(BlogContent content) {
    this.content = content;
  }

  public String getPublished() {
    return published;
  }

  public String getId() {
    return id;
  }

  public Author getAuthor() {
    return author;
  }

  public String getSummary() {
    return summary;
  }

  public String getUpdated() {
    return updated;
  }

  public Category[] getCategories() {
    return categories;
  }

  public String getTitle() {
    return title;
  }

  public void setTitle(String title) {
    this.title = title;
  }

  @Override
  public String toString() {
    return (title == null) ? "" : title;
  }
}